package tyk;

import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import tyk.aop.config.SpringConfig;
import tyk.aop.service.UserService;
import tyk.aop.service.impl.UserServiceImpl;

public class Main {
    public static void main(String[] args) {
//        ApplicationContext context= new ClassPathXmlApplicationContext("application.xml");
        ApplicationContext context=new AnnotationConfigApplicationContext(SpringConfig.class);
        UserService userService=context.getBean(UserService.class);
        userService.addUser();
        System.out.println("******************");
        userService.deleteUser();
        System.out.println("******************");
        userService.updateUser();
        System.out.println("******************");
        userService.queryUser();

    }
}